package club325.webchat.database.hibernate.dao;

import java.util.List;

import club325.webchat.database.hibernate.domain.Friends;

public interface FriendsDAO
{
	/**
	 * insert data of Friends into the database
	 * @param friend the bean holding the data
	 */
	public void saveFriends(Friends friend);

	/**
	 * Find the only Friends by its id
	 * @param id the ID of Friends must equal this id 
	 * @return the result.return null if no Friends is found. 
	 */
	public Friends findFriendsByID(int id);

	/**
	 * Get a list of Friends by Owner.
	 * @param Owner
	 * @return return a list to hold the Friends.
	 */
	public List<Friends> findFriendsByOwner(String Owner);

	/**
	 * Get a list of Friends by the attribute FriendList  
	 * @param ListName
	 * @return a list to hold the Friends
	 */
	public List<Friends> findFriendsByFriendList(String ListName);

	/**
	 * Get a list of Friends by the attribute FriendID
	 * @param FriendID
	 * @return a list to hold the Friends
	 */
	public List<Friends> findFriendsByFriendID(String FriendID);

	/**
	 * 
	 * @return
	 */
	public List<String> getAllfriends(String OwnerID);
	
	/**
	 * Find Friends by id and update it.
	 * @param friend
	 */
	//public void UpdateFriends(Friends friend);

	/**
	 * delete Friends by id
	 * @param friend
	 */
	public void remove(Friends friend);
}
